package com.example.cake.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("sys_customer")
public class SysCustomer {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String username;
    private String nickname;
    private String avatar;
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) //密码不返回给前端
    private String password;
    private String sex;
    private String phone;
    private String email;
    @TableField(value = "createtime")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
    @TableLogic(value = "0", delval = "1")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) //逻辑删除不返回给前端
    private Integer isDelete;
}
